
public class SphereDriver {

	public static void main(String[] args) {

		Sphere s1 = new Sphere(5,1,3);
		System.out.println("Sphare 1 befor modification:");
		System.out.println("Center: (" + s1.getxCenter() + " , " + s1.getyCenter() + ')');
		System.out.println("Radius: " + s1.getRadius() + " cm");
		System.out.printf("Volume = %.2f cubic cm %n" , s1.Volume());
		System.out.printf("Surface Area = %.2f square cm %n%n" , s1.surfaceArea());

		s1.setRadius(10);
		s1.setxCenter(4);
		s1.setyCenter(-9);

		System.out.println("Sphere1 after modification:");
		System.out.println("Center: (" + s1.getxCenter() + " , " + s1.getyCenter() + ')');
		System.out.println("Radius: " + s1.getRadius() + " cm");
		System.out.printf("Volume = %.2f cubic cm %n" , s1.Volume());
		System.out.printf("Surface Area = %.2f square cm %n%n" , s1.surfaceArea());


		Sphere s2 = null, s3 = null;
		s2 = new Sphere(3, 7, -3);
		s3 = new Sphere (s2);

		System.out.println("Sphere2: " + s2.toString());

		if (s2.equals(s3)) {
			System.out.println("Sphere3 is a copy of Sphere2: " + s3.toString());
			System.out.print("Sphere2 is equals to Sphere3.");
		}

	}

}
